//
//  ThreePhotoTableViewCell.m
//  XiangMuB
//
//  Created by 999999999999 on 16/8/17.
//  Copyright © 2016年 lanou3g. All rights reserved.
//

#import "ThreePhotoTableViewCell.h"
#import <UIImageView+WebCache.h>

@implementation ThreePhotoTableViewCell


-(void)awakeFromNib {
    //cell的背景图片
    UIImageView *bgView = [[UIImageView alloc]init];
    bgView.image = [UIImage imageNamed:@"mainCellBackground"];
    self.backgroundView = bgView;
}
-(void)setFrame:(CGRect)frame {
    frame.origin.x = 10;
    frame.size.width -= 2*frame.origin.x;
    frame.size.height -= 8;
    frame.origin.y += 10;
    [super setFrame:frame];
}
- (void)layoutSubviews {
    
    self.title.text = self.model.title;
    self.sourcess.text = self.model.source;
    self.gentie.text = [NSString stringWithFormat:@"%ld",(long)self.model.votecount];
//    NSLog(@"434343%@",self.model.title);
    
    [self.image1 sd_setImageWithURL:[NSURL URLWithString:self.model.imgsrc]];
    
    NSDictionary *dic1 = self.model.imgextra[0];
    [self.image2 sd_setImageWithURL:[NSURL URLWithString:[dic1 objectForKey:@"imgsrc"]]];
    
    
    NSDictionary *dic2 = self.model.imgextra[1];
    [self.image3 sd_setImageWithURL:[NSURL URLWithString:[dic2  objectForKey:@"imgsrc"]]];

}

@end
